#bool类型Gamerule根据 True/False 运行

$execute store result score util.bool temp run data get storage dab:system gameRule[{id:"$(gamerule_id)"}].switch

#true:
$execute if score util.bool temp matches 1 run function util:run_command {command:"$(true_run)"}

#false:
$execute if score util.bool temp matches 0 run function util:run_command {command:"$(false_run)"}

scoreboard players reset util.bool temp